<include file="Common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('system/sms_template')}">SMS信息模板</a>
</div>
<div class="permissions-content">
    <div class="permissions-le">
        <span class="add-admin"><a href="javascript:history.go(-1)"></a>添加模板</span>
        <div class="message-set">
            <span class="hints">操作提示</span>
            <span class="hints-dec">请根据短信服务平台，添加服务平台存在的模板，并与服务平台模板保持一致，还需确保模板唯一性。</span>
        </div>
        <form method="post" id="handlepost" action="{:U('System/add_sms_template')}" enctype="multipart/form-data" name="form1">
            <div class="add-admin-ipt">
                <span>服务平台:</span>
                <div class="add-admin-opt">
                    <select name="sms_id" id="sms_id" style="width:150px">
                        <option value="">请选择服务平台</option>
                        <foreach name="sms_service" item="sv">
                            <option value="{$sv.sms_id}">{$sv.sms_name}</option>
                        </foreach>
                    </select>
                </div>
            </div>

            <div class="add-admin-ipt">
                <span>使用场景:</span>
                <div class="add-admin-opt">
                    <select name="send_scene" id="send_scene" style="width:150px">
                        <option value="">请选使用场景</option>
                        <foreach name="tpl_scene" item="scene" key="k">
                            <option value="{$k}">{$scene}</option>
                        </foreach>
                    </select>
                </div>
            </div>

            <div class="add-admin-ipt">
                <span><i>*</i>模板名称:</span>
                <div class="add-admin-opt">
                    <input name="sms_title" type="text" />
                </div>
            </div>

            <div class="add-admin-ipt">
                <span><i>*</i>模板ID:</span>
                <div class="add-admin-opt">
                    <input name="sms_tpl_code"  type="text" />
                </div>
            </div>
            <div class="add-admin-ipt">
                <span><i>*</i>签名:</span>
                <div class="add-admin-opt">
                    <input name="sms_sign"  type="text">
                </div>
            </div>
            <div class="add-admin-ipt">
                <span><i>*</i>模板内容:</span>
                <div class="add-admin-opt">
                    <input name="tpl_content"  type="text">
                </div>
            </div>

            <div class="add-admin-ipt">
                <span></span>
                <input type="submit" name="" value="保存" class="sbm"/>
            </div>
        </form>
    </div>
    <div class="permissions-ri">
        <a href="" class="permissions-help">帮助和服务</a>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        $(".sbm").click(function(){
            var send_scene = $("#send_scene").val();
            var sms_id = $("#sms_id").val();
            if(!sms_id || !send_scene){
                layer.alert("请完善模板信息");return false;
            }
            $("#handlepost").submit();
        });
    });
</script>
<include file="common:__foot__"/>
